package com.cloudkinto.controller.channel;


import com.cloudkinto.base.BaseController;
import com.cloudkinto.common.annotations.UserSessionRequired;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.service.channel.LogisticsChannelService;
import com.cloudkinto.vo.channel.la.LaSwitchReq;
import com.cloudkinto.vo.channel.lc.*;
import io.swagger.annotations.*;
import lombok.RequiredArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author hua
 * @since 2024-10-29
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "物流商渠道wms模块")
@RequestMapping("/api/admin/wms/LogisticsChannel")
public class LogisticsChannelWmsController extends BaseController {
    private final Logger logger = LoggerFactory.getLogger(LogisticsChannelWmsController.class);

    private final LogisticsChannelService service;


    @UserSessionRequired
    @GetMapping("/getLcList")
    @ApiImplicitParams({@ApiImplicitParam(name = "warehouseId", value = "仓库id")})
    @ApiOperation(value = "根据仓库id 获取物流渠道", notes = "根据仓库id 获取物流渠道")
    @ApiResponses(@ApiResponse(code = 200, message = "", response = LcOptionRes.class))
    public SingleResult getLcList(Long companyId) {
        return SingleResult.success("查询成功",service.getLcForOut(getWarehouseId(), companyId, getTenantId()));
    }

}

